//
//  LoginViewController.m
//  CarLife
//
//  Created by yu on 2019/3/28.
//  Copyright © 2019年 jpas. All rights reserved.
//

#import "LoginViewController.h"
#import "CTabBarController.h"

@interface LoginViewController ()
@property (weak, nonatomic) IBOutlet UITextField *phoneTextField;
@property (weak, nonatomic) IBOutlet UITextField *codeTextField;
@property (weak, nonatomic) IBOutlet UIButton *loginBtn;

@end

@implementation LoginViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    [self setLeftImageNamed:@"back_gray" action:@selector(returnAction)];
}

- (IBAction)loginAction:(id)sender {
    CTabBarController *cTab = [[CTabBarController alloc] init];
    KEY_WINDOW.rootViewController = cTab;
}

- (IBAction)strollAction:(id)sender {
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    [self setWhiteNavigationBar];
    [self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
    [self.navigationController.navigationBar setShadowImage:[UIImage new]];
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    [self setDefaultNavigationBar];
    [self.navigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
    [self.navigationController.navigationBar setShadowImage:nil];
}

- (void)returnAction {
    [self.navigationController popViewControllerAnimated:YES];
}

@end
